package com.sptpc.learnspring.global.response;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 业务的响应返回码
 */
@Getter
@AllArgsConstructor
public enum BusinessStatusCode {
    //--------------- 业务code并非http status code ---------------
    SUCCESS(200, "操作成功"),

    FAILURE(500, "操作失败"),

    FORBID(1000, "没有执行权限，请联系管理员"),

    DRINK_EXISTS(1001, "同名饮品已经存在"),

    AUTHEN_FAIL(1010, "认证失败, 用户名或密码错误"),

    TOKEN_EXPIRED(1011, "Token 已过期, 请重新登录"),

    TOKEN_PARSE_ERROR(1012, "Token异常");

    final int code;
    final String message;
}
